home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 June / PCWorld_2007-06_cd.bin / temacd / wikipad / WikidPad-1.9beta2.exe / {app} / WikidPadHelp / data / WikiPadHooks.wiki < prev    next >
Encoding:
Text File  |  2005-08-13  |  6.0 KB  |  238 lines

  1. ++ Wiki Pad Hooks
  2.  
  3. Under the wikidPad install directory:
  4.  
  5. file:///C|/Program%20Files/WikidPad by default
  6.  
  7. There is a directory called "extensions".  In this folder there is a
  8. file called "wikidpadhooks.py". If you know Python you can extend
  9. wikidPad by hooking into the events sent to the methods defined
  10. in this file. For example, you could integrate wikidPad with cvs
  11. by plugging into the onopen, onsave, ondelete, onrename events.
  12.  
  13. file:///C|/Program%20Files/WikidPad/extensions/WikidPadHooks.py
  14. file:///C|/Program%20Files/WikidPad/user_extensions/WikidPadHooks.py
  15.  
  16. ++ API Documentation
  17.  
  18. The first argument to each hook function is wikidPad itself.  Here are
  19. the available methods on the wikidPad object.
  20.  
  21. *wikidPad functions*
  22.  
  23. newWiki(wikiName, wikiDir)
  24.     create a new wiki
  25.  
  26. openWiki(wikiConfigFile, wikiWordToOpen)
  27.     open a wiki, and optionally a page in that wiki.
  28.  
  29. saveCurrentWikiState()
  30.     Write any changes to the wiki to disk.
  31.     
  32. openWikiPage(wikiWord)
  33.     Open a specific wiki word.
  34.  
  35. findCurrentWordInTree()
  36.     Select the currently open page in the tree control.
  37.     
  38. viewParents(word)
  39.     Pop up the dialog that shows the parents of the node passed in.
  40.  
  41. viewChildren()
  42.     Pop up the dialog that shows the children of the node passed in.
  43.  
  44. addToHistory(word)
  45.     Add the word passed in to the history.
  46.     
  47. goInHistory(positionDelta)
  48.     Go back or forward in history by the amount passed in.
  49.     
  50. goBackInHistory()
  51.     Go back in history one position.
  52.     
  53. goForwardInHistory()
  54.     Go forward in history one position.
  55.     
  56. viewHistory()
  57.     Show the history dialog.
  58.     
  59. viewBookmarks()
  60.     Show the bookmarks dialog.
  61.     
  62. saveCurrentWikiPage()
  63.     Save the current wiki page to disk.
  64.     
  65. showWikiWordOpenDialog()
  66. showWikiWordRenameDialog()
  67. showWikiWordRenameConfirmDialog()
  68. showSearchDialog()
  69. showSavedSearchesDialog()
  70. showWikiWordDeleteDialog()
  71. showFindReplaceDialog()
  72.  
  73. displayMessage(title, msg)
  74.     Popup a dialog with the message passed in.
  75.     
  76. displayErrorMessage(errorStr, exception)
  77.     Popup an exception dialog.
  78.     
  79. *wikidPad.variables*
  80.  
  81. globalConfigDir
  82.     The directory of the wikidPad.config file.
  83.  
  84. globalConfigLoc
  85.     The wikidpad.config file.
  86.  
  87. globalConfig
  88.     The parsed wikidpad.config file.
  89.  
  90. wikiAppDir
  91.     The installation directory of wikidPad.
  92.     
  93. wikiPadHelp
  94.     The location of the help wiki.
  95.     
  96. config
  97.     The parsed configuration of the opened wiki.
  98.     
  99. wikiName
  100.     The name of the currently opened wiki.
  101.     
  102. dataDir
  103.     The data directory of the currently opened wiki.
  104.     
  105. wikiData
  106.     The database object for the currently open wiki. More on this below.
  107.     
  108. tree
  109.     The tree control on the left. The is a wxTreeCtrl. More on this below.
  110.  
  111. currentWikiWord
  112.     The currently open wiki word.
  113.     
  114. currentWikiPage
  115.     The data for the currently open wiki word. More on this below.
  116.     
  117. editor
  118.     The text editor for wikidPad. This is a wxStyledTextCtrl. More on this below.
  119.     
  120.     
  121. *wikiData - The wiki database interface* 
  122.  
  123. getPage(wikiWord, itemsToLoad) 
  124.     Get the data for a wiki word. Pass in an array of strings for the items to load.
  125.     Valid items are: info, parents, children, props, todos.
  126.     For performance you specify which items should be loaded from the db. If you only
  127.     need info and children call:
  128.     
  129.     getPage(word, ["info", "children"])
  130.     
  131.     More on the return value of this function below.
  132.     
  133. getChildRelationships(wikiWord)
  134.     Returns array of the words that are children of the word passed in.
  135.     
  136. getParentRelationships(wikiWord)
  137.     Returns array of the words that are parents of the word passed in.
  138.     
  139. getAllWords()
  140.     Get all of the wiki words in the wiki.
  141.     
  142. getAllAliases()
  143.     Get all of the aliases in the wiki.
  144.     
  145. getAllRelations()
  146.     Get all of the relationships in the wiki. Returns array of tuples, (word, relatedTo).
  147.     
  148. getWikiWordsStartingWith(string)
  149. getWikiWordsWith(string)
  150. getWikiWordsModifiedWithin(days)
  151. getParentLessWords()
  152.  
  153. renameWord(word, toWord)
  154.     Rename a wiki word.
  155.     
  156. deleteWord(word)
  157.     Delete a wiki word.
  158.     
  159. getWordsWithPropertyValue(key, value)
  160.     Get all of the wiki words with a certain property value. For example
  161.     getWordsWithPropertyValue("icon", "pin") would get all of the wiki
  162.     words with "icon" set to "pin".
  163.  
  164. findBestPathFromWordToWord(word, toWord)
  165.     Returns the shortest path in the wiki from "word" to "toWord". Returned
  166.     as an array of wiki words.
  167.     
  168. search(forPattern)
  169.     Search the entire wiki using a regex.
  170.  
  171. *wikiPage object*
  172.  
  173. wikiWord
  174.     The word.
  175.  
  176. wikiFile
  177.     The file that contains the data for this page.
  178.  
  179. parentRelations
  180.     Array of the parents words for this node.
  181.  
  182. childRelations
  183.     Array of the child words for this node.
  184.  
  185. todos
  186.     Array of todos
  187.  
  188. props
  189.     Hashtable of properties for the node.
  190.     
  191. getContent()
  192.     Get the string content for the node.
  193.  
  194. save()
  195.     Save the changes to this page to disk.
  196.     
  197.     
  198. *tree control*
  199.  
  200. collapse()
  201.     collapse the tree.
  202.     
  203. buildTreeForWord(wikiword)
  204.     Open the tree control to the wiki word passed in.
  205.     
  206. *text control*
  207.  
  208. setWrap(onOrOffBoolean)
  209.     Set the wrap mode to on/off.
  210.  
  211. SetText()
  212.     Set the text of the control.
  213.     
  214. snip()
  215.     Copy the currently selected text to the ScratchPad.
  216.  
  217. startIncrementalSearch(searchStr)
  218.     Set the search mode to incremental.
  219.     
  220. endIncrementalSearch()
  221.     Stop incremental search.
  222.  
  223. executeSearch(searchStr, searchStartPos=-1)
  224.     Execute a search of the text in the control.
  225.     
  226. getWikiWordText(position)
  227.     If position is in a wiki word return that word.
  228.     
  229. getWikiWordBeginEnd(position)
  230.     If position is in a wiki word return the start/end positions of the word.
  231.     
  232. isPositionInWikiWord(position)
  233.     Is the position in a wiki word?
  234.     
  235. isPositionInLink(position)
  236.     Is the position in a URL link?
  237.  
  238. See the wxWindows/wxPython documentation for info about the wxTreeCtrl and wxStyledTextCtrl.